package com.greenx.hello;

import java.util.Random;

/**
 * 
 * @author u123199
 * 
 */
public class HRadom {

	public static void main(String[] args) {

		Random gen = new Random(9999999);

		String tmp = "";
		String order = "";
		for (int i = 0; i < 100000000; i++) {
			long r = gen.nextInt();
			String t = "|" + r + "|";
			if (order.indexOf(t) > 0) {
				System.out.println("--RETURN---" + i + "-----");
				return;
			}
			order = order + "|" + r + "|";
			if (i % 10000 == 0) {
				tmp = tmp + "--" + r;
				System.out.println("iterate:" + tmp);
				tmp = "";
			} else {
				tmp = tmp + "--" + r;

			}

			if (i == (100000000 - 1)) {
				System.out.println("--@---" + (100000000 - 1) + "-----");
			}
		}
	}

}
